﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// PhanCongGiangDay Repository. Good example of CRUD operations.
    ///// </summary>
    public class PhanCongGiangDayRepository : IPhanCongGiangDayRepository
    {
        private static readonly IPhanCongGiangDayDao _phanCongGiangDay = DataAccess.PhanCongGiangDayDao;
        public List<PhanCongGiangDay> GetList()
        {
          return   _phanCongGiangDay.GetPhanCongGiangDay().ToList();
        }

        public PhanCongGiangDay Get(string id)
        {
         return    _phanCongGiangDay.GetPhanCongGiangDayByID(id);
        }

        public void Insert(PhanCongGiangDay t)
        {
            _phanCongGiangDay.InsertPhanCongGiangDay(t);
        }

        public void Update(PhanCongGiangDay t)
        {
            _phanCongGiangDay.UpdatePhanCongGiangDay(t);
        }

        public void Delete(PhanCongGiangDay t)
        {
            _phanCongGiangDay.DeletePhanCongGiangDay(t);
        }

        public List<PhanCongGiangDay> GetPhanCongGiangDayBySchoolId(string SchoolYearID, int schoolId)
        {
          return   _phanCongGiangDay.GetPhanCongGiangDayBySchoolId(SchoolYearID, schoolId);
        }
    }
}